From: kaf24@firebug.cl.cam.ac.uk Date: Tue, 11 Apr 2006 09:40:03 +0000 (+0100) Subject: Make event_pending() architecture-specific. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16158^2~5^2~2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=89bbff5329afc3b05ccc14ef3cf733f35d8ea4d3;p=xen.git Make event_pending() architecture-specific. PowerPC needs this because the domain can directly modify the hardware's "interrupts enabled" bit, and we don't want to patch Linux to replace all those accesses to use evtchn_upcall_mask instead. Signed-off-by: Hollis Blanchard --- diff --git a/xen/include/asm-ia64/event.h b/xen/include/asm-ia64/event.h index 297351072d..32afe39795 100644 --- a/xen/include/asm-ia64/event.h +++ b/xen/include/asm-ia64/event.h @@ -32,4 +32,9 @@ static inline void evtchn_notify(struct vcpu *v) vcpu_pend_interrupt(v, v->vcpu_info->arch.evtchn_vector); } +/* Note: Bitwise operations result in fast code with no branches. */ +#define event_pending(v) \ + (!!(v)->vcpu_info->evtchn_upcall_pending & \ + !(v)->vcpu_info->evtchn_upcall_mask) + #endif diff --git a/xen/include/asm-x86/event.h b/xen/include/asm-x86/event.h index d491d24313..ad1b9b245a 100644 --- a/xen/include/asm-x86/event.h +++ b/xen/include/asm-x86/event.h @@ -26,4 +26,9 @@ static inline void evtchn_notify(struct vcpu *v) smp_send_event_check_cpu(v->processor); } +/* Note: Bitwise operations result in fast code with no branches. */ +#define event_pending(v) \ + (!!(v)->vcpu_info->evtchn_upcall_pending & \ + !(v)->vcpu_info->evtchn_upcall_mask) + #endif diff --git a/xen/include/xen/event.h b/xen/include/xen/event.h index 13b2b5f9be..f7dee3b75d 100644 --- a/xen/include/xen/event.h +++ b/xen/include/xen/event.h @@ -38,11 +38,6 @@ extern void send_guest_global_virq(struct domain *d, int virq); */ extern void send_guest_pirq(struct domain *d, int pirq); -/* Note: Bitwise operations result in fast code with no branches. */ -#define event_pending(v) \ - (!!(v)->vcpu_info->evtchn_upcall_pending & \ - !(v)->vcpu_info->evtchn_upcall_mask) - #define evtchn_pending(d, p) \ (test_bit((p), &(d)->shared_info->evtchn_pending[0]))